/*Author : Rozi Kapara Dista*/

package jtk.project4.fleet.field;

import java.awt.Dimension;

import nl.coderight.jazz.form.FormLayout;
import nl.coderight.jazz.form.control.GroupControl;
import nl.coderight.jazz.form.field.button.CheckButton;
import nl.coderight.jazz.form.field.SelectField;
import nl.coderight.jazz.form.control.CalendarControl;

public class SeasonalTrackingField extends GroupControl{
	private CheckButton seasonTaskField;
	private CalendarControl startDateField;
	private CalendarControl endDateField;
	
	public SeasonalTrackingField(String bindID){
		setTitle("header.AdvancedOptions");
		setBindID(bindID);
		createFields();
		createLayout();
	}
	
	private void createFields(){
		seasonTaskField = new CheckButton("Seasonal Task - Task will be ignored during the following date period:");
		startDateField = new CalendarControl("tgl",20);
		startDateField.showYearSpinner(true);
		startDateField.setPreferredSize(new Dimension(166, 20));
		endDateField = new CalendarControl("tgl",20);
		endDateField.showYearSpinner(true);
		endDateField.setPreferredSize(new Dimension(166, 20));
	}
	
	private void createLayout() {
		setLayout(new FormLayout())
		.addField(seasonTaskField)
		.addRow()
		.addRow()
		.addLabel("Start Date:")
		.addField(startDateField)
		.addLabel("End Date:")
		.addField(endDateField);
	}
	
}
